package org.irri.smta.ui.bean;

import javax.faces.bean.ApplicationScoped;
import javax.inject.Named;

import org.irri.smta.config.impl.Configuration;

@Named("uiConfigBean")
@ApplicationScoped
public class UIConfigBean extends Configuration {
	
	private static final long serialVersionUID = 1L;
	
	private static final String DEFAULT_THEME = "south-street";
	
	private static final String DEFAULT_UI_DIALOG_SHOW_EFFECT = "fade";
	private static final String DEFAULT_UI_DIALOG_HIDE_EFFECT = "fade";
	
	private static final String DEFAULT_UI_TOOLTIP_SHOW_EFFECT = "fade";
	private static final String DEFAULT_UI_TOOLTIP_HIDE_EFFECT = "fade";
	
	private static final String DEFAULT_UI_SELECTONEMENU_SHOW_EFFECT = "fade";
	private static final String DEFAULT_UI_SELECTONEMENU_HIDE_EFFECT = "fade";
	
	public String getDefaultTheme() {
		return getString("/application/ui/theme/default", DEFAULT_THEME);
	}
	
	public String getAdministratorTheme() {
		return getString("/application/ui/theme/administrator", DEFAULT_THEME);
	}

	public String getDataEntryTheme() {
		return getString("/application/ui/theme/dataEntry", DEFAULT_THEME);
	}
	
	public String getUserTheme() {
		return getString("/application/ui/theme/user", DEFAULT_THEME);
	}
	
	public String getDialogShowEffect() {
		return getString("/application/ui/dialog/showEffect", DEFAULT_UI_DIALOG_SHOW_EFFECT);
	}
	
	public String getDialogHideEffect() {
		return getString("/application/ui/dialog/hideEffect", DEFAULT_UI_DIALOG_HIDE_EFFECT);
	}
	
	public String getTooltipShowEffect() {
		return getString("/application/ui/tooltip/showEffect", DEFAULT_UI_TOOLTIP_SHOW_EFFECT);
	}
	
	public String getTooltipHideEffect() {
		return getString("/application/ui/tooltip/hideEffect", DEFAULT_UI_TOOLTIP_HIDE_EFFECT);
	}
	
	public String getSelectOneMenuShowEffect() {
		return getString("/application/ui/selectOneMenu/showEffect", DEFAULT_UI_SELECTONEMENU_SHOW_EFFECT);
	}
	
	public String getSelectOneMenuHideEffect() {
		return getString("/application/ui/selectOneMenu/hideEffect", DEFAULT_UI_SELECTONEMENU_HIDE_EFFECT);
	}
	
}
